import {th} from "element-plus/es/locales.mjs";
import { defineStore } from "pinia";

export const userStore = defineStore("user",{
    state:()=>({//存放属性
        isLoggedIn:false,
        user:null,
    }),
    actions:{   //存放方法
        login(user){
            this.isLoggedIn=true;
            this.user=user;
        },
        logout(){
            this.isLoggedIn=false;
            this.user=null;
        },
    },
    persist:{}
});